package org.streets.workflow.engine;

import org.streets.workflow.engine.calendar.ICalendarService;
import org.streets.workflow.engine.condition.IConditionResolver;
import org.streets.workflow.engine.persistence.IWorkflowDAO;

public interface WorkflowContext {

	/**
	 * 根据bean的name返回bean的实例。<br/>
	 * Fire workflow RuntimeContext将该工作委派给org.fireflow.engine.beanfactory.IBeanFatory
	 * @param beanName Bean Name具体指什么是由IBeanFatory的实现类来决定的。
	 * @return
	 */
//	public abstract Object getBeanByName(String beanName);

	/**
	 * 返回条件解析器
	 * @return
	 */
	public abstract IConditionResolver getConditionResolver();

	/**
	 * 设置条件解析器
	 * @param resolver
	 */
	public abstract void setConditionResolver(IConditionResolver resolver);

	public abstract IWorkflowDAO getPersistenceService();

	public abstract void setPersistenceService(IWorkflowDAO persistenceService);

	public abstract ICalendarService getCalendarService();

	public abstract void setCalendarService(ICalendarService calendarService);

	public abstract WorkflowEngine getWorkflowEngine();

	public abstract boolean isInitialized();

	/**
	 * 初始化方法
	 * @throws WorkflowException
	 * @throws KernelException
	 */
	public abstract void initialize() throws WorkflowException;

	public abstract boolean isEnableTrace();

}